package ningbo.review;

import java.io.*;

/**
 * @Author 宁铂
 * @Date 2021/7/27 10:29
 * @Version 1.0
 */
public class ReviewIO {
    /** 本类用于复习IO流的操作 */
    public static void main(String[] args) throws IOException {
        /** 字节输入流 */
        InputStream in1 = new BufferedInputStream(new FileInputStream("F:\\TestFile\\1.txt"));
        InputStream in = new FileInputStream("F:\\TestFile\\1.txt");

        /** 字节输出流 */
        OutputStream out1 = new FileOutputStream("F:\\TestFile\\1.txt");
        OutputStream out2 = new BufferedOutputStream(new FileOutputStream("F:\\TestFile\\1.txt"));

        /** 字符输入流 */
        Reader in2 = new FileReader("F:\\TestFile\\1.txt");
        Reader in3 = new BufferedReader(new FileReader("F:\\TestFile\\1.txt"));

        /** 字符输出流 */
        Writer out3 = new FileWriter("F:\\TestFile\\1.txt");
        Writer out4 = new BufferedWriter(new FileWriter("F:\\TestFile\\1.txt"));

        out4.flush(); /** flush() 方法用于立刻将缓冲区内的数据写入文件中,并且清空缓冲区 */
    }
}
